package com.alibaba.serverless.dao.impl;

import com.alibaba.serverless.common.util.SqlSessionUtil;
import com.alibaba.serverless.dao.SmtpConfigDao;
import com.alibaba.serverless.domain.SmtpConfig;
import org.apache.ibatis.session.SqlSession;

/**
 * SMTP配置 Dao实现接口
 * @author mac_zyj
 */
public class ISmtpConfigDaoImpl  implements SmtpConfigDao {
    private SqlSession sqlSession;
    @Override
    public SmtpConfig selectSmtpConfigByName(String configName) {
        sqlSession = SqlSessionUtil.getSession();
        try {
            return sqlSession.selectOne("com.alibaba.serverless.dao.SmtpConfigDao.selectSmtpConfigByName",configName);
        }finally {
            sqlSession.close();
        }
    }
}
